<template>
<div class="storedetail">
    <div class="iframbox">
      <iframe :src="src1" frameborder="0" id = "detailiframe"></iframe>
    </div>
</div>

</template>

<script>
import { pro } from '../../../config/env'
    import { mapState, mapGetters, mapMutations } from 'vuex'
  export default {
    data(){
      return {
        src1: ''
      }
    },
    created(){
      // alert(1)
      this.fn1();
    },
 
    methods: {
        fn1() {
             this.$nextTick(() => {
            // $('.app-adver')[0] &&  $('.coupontype').addClass('cart2-coupon')
                 this.src1 = pro + '/api/cmmdty/getCmmdtyImgText/'+this.position.cityCode+'_'+this.position.storeLocation+'_'+this.$route.params.cmmdtyCode+'.htm'
                  $('.storedetail').height( $('.protool').offset().top - $('.storedetail').offset().top);

                  $('.li_close a').click(function(){
                      setTimeout(() => {
                        $('.storedetail').height( $('.protool').offset().top - $('.storedetail').offset().top);
                      },500)
                  })
            })
        }
    },

    computed: {
      ...mapGetters({
        position: 'position'
      })
    },
  }
</script>

<style scoped>
  #detailiframe {
    width: 100%;
    height: 100%;
  }
.storedetail .iframbox{
  height: 100%;
  overflow-y: auto;
}
</style>
